import { apiIndexNav } from 'js/api'

export default {
  state: {
    mainNavList: [],
    classifysHeight: 420 // 行业分类高度
  },
  getters: {
    mainNavList: state => state.mainNavList,
    classifysHeight: state => state.classifysHeight
  },
  actions: {
    // 获取所有订单列表
    apiIndexNavList({ state }, industry) {
      apiIndexNav(industry).then(data => {
        state.mainNavList = data.titleinfo
      })
    }
  },
  mutations: {
    setClassifysHeight(state, payload) {
      state.classifysHeight = payload
    }
  }
}
